package spring.mvc.config;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ControllerAdvice;

// 扫描包路径，spring 扫描除 controller 层以外的，spring 不可从子容器(spring mvc)中获取 bean
@ComponentScan(basePackages = {"spring.mvc"}, excludeFilters = {
        @ComponentScan.Filter(type = FilterType.ANNOTATION, classes = {Controller.class, ControllerAdvice.class}),
        @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {SpringMvcConfig.class}),
})
public class RootConfig {
}
